<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title></title>
</head>
<body>
	
	<%
	String nome = "", cognome = "", type = "";
	
	if(session.getAttribute("nome") != null) {
		nome = (String) session.getAttribute("nome");
		cognome = (String) session.getAttribute("cognome");
		
		if(session.getAttribute("type").equals("utente")) {	
			type = "RegisteredUser";
		} else {
			type = "Admin";
		}
		%>
		
		<ul>
			<li><FORM METHOD="POST" ACTION="/ProgettoWeb/LogoutServlet">
			<input type="submit" value="LOGOUT">
			</FORM>	</li>
			<li><a href="#"><% out.print(nome + " " + cognome);%></a></li>
			<li><a href="/ProgettoWeb/<% out.print(type);%>/Profilo.jsp">Torna al tuo profilo</a></li>
		
		<% 	
	}
	%>
	<li><a href="/ProgettoWeb/ResearchAbilities.html?choice=search">Cerca</a></li>
	</ul>
</body>
</html>